import config from '@/config'
import axios from '@/libs/api.request'

/**
 * 获取图片验证码
 */
export const getCodeImg = () => {
  let time = Date.parse(new Date())
  let url = `${config.baseUrl.pro}/captcha${time}.jpg`
  let data = {
    url,
    time
  }
  return data
}

/**
 * 登陆
 */
export const login = (data) => {
  return axios.request({
    url: '/login',
    data: data,
    method: 'post'
  })
}

/**
* 修改密码
* */
export const amendPwd = (data) => {
  return axios.request({
    url: '/updatePwd',
    data,
    method: 'post'
  })
}
